Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to show Web Enrollment Endpoint when run from non domain joined machine #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LuemmelSec
Copy link
Contributor

Due to the nature of the HttpUtil.cs script handling authentication via CredentialCache.DefaultNetworkCredentials), the tool would never reveal the Web Enrollment Endpoints when run from a non domain joined machine with
runas /netonly /user:domain\testuser powershell

The credentials are not in the cache and the tool only honors 200 OK to be true.
But there is also the endpoint available if we get a 403 or 401, we are just not authenticated.

I debugged this a little and wrote the results to the command line:
image

After the changes it looks good:
image

Update to list web enrollment endpoints when run with 
runas /netonly from a non domain joined machine.
@leechristensen
Copy link
Member

Thanks for the contribution! I'm getting a false reading on this when I don't have NDES installed. It says the NDES endpoint is present when in reality it is not. May want to doublecheck with CES/CEP as well.

@LuemmelSec
Copy link
Contributor Author

Hi Lee, I can't reproduce this.
This is the ADCS view
image

And this the results:
image

The endpoint correctly gives 404, so should be ignored by the checks which look for 401 or 403:
image

So this shows correct.

If i enable NDES it also shows correctly:

image

What I observed however, is that from time to time the requests would fail, resulting in a False statement even if the endpoint is available. I raised the timeout to 5s, and it worked all the time.

So I can't confirm what you said. I can rather proof the opposite.

If you could share more detail...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants